
<?php include_once 'common/header.php';  ?>
<!-- admin_main -->
<div class="admin_main">
	<!-- Admin_top end -->
	<?php include_once 'common/site_left.php';  ?>
	<!-- Admin_Left End -->
	<div class="admin_right">
		<div class="admin_right_title">
			<strong>栏目管理</strong> &gt;&gt;  滚动图片列表
		</div>

        <div class="admin_right_con">
            <table border="0" cellspacing="1" cellpadding="0" bgcolor="#CCCCCC">
                <tr style="color:#0068b7;">
                    <td height="35" align="center" valign="middle" bgcolor="#F1F1F1">编号</td>
                    <td height="35" align="center" valign="middle" bgcolor="#F1F1F1">URL</td>
                    <td height="35" align="center" valign="middle" bgcolor="#F1F1F1">标题</td>
                    <td height="35" align="center" valign="middle" bgcolor="#F1F1F1">图片</td>
                    <td height="35" align="center" valign="middle" bgcolor="#F1F1F1">顺序</td>
                    <td height="35" align="center" valign="middle" bgcolor="#F1F1F1">操作</td>
                </tr>

                <tbody>
                <?php foreach($scrollpic_list as $key=>$scrollpic){?>
                    <tr id="row_<?php echo $scrollpic['id'];?>">
                        <td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $scrollpic['id'];?></td>
                        <td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $scrollpic['url'];?></td>
                        <td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $scrollpic['title'];?></td>
                        <td height="35" align="center" valign="middle" bgcolor="#FFFFFF">
                            <img src="<?php echo SCROLLPIC_IMG.$scrollpic['pic'];?>" width="100" height="33"  />
                        </td>
                        <td height="35" align="center" valign="middle" bgcolor="#FFFFFF"><?php echo $scrollpic['forder'];?></td>
                        <td height="35" align="center" valign="middle" bgcolor="#FFFFFF">
                            <a href="/ychadmin/scrollpic/edit_view/<?php echo $scrollpic['id'];?>">编辑</a>
                            <a href="javascript:if(confirm('确定删除滚动图片？')){remove(<?php echo $scrollpic['id'];?>);}">删除</a>
                        </td>
                    </tr>
                <?php }?>


                </tbody>
            </table>
        </div>
	</div>
<!-- Admin_Right End -->
</div>
<!-- admin_main end -->
<script>
function remove(id){
	$.ajax({
		type: "post",
		url: "/ychadmin/scrollpic/remove/",
		data: "id="+id,
		success: function(msg){
			$("#dialog" ).dialog();
			if(msg == 1){
				$("#msg").html("删除成功！");
				$("#row_"+id).hide();
			}else{
				$("#msg").html("删除失败，请联系管理员！");
			}
			setTimeout(function(){
				$("#dialog" ).dialog("close");
			},3000);
		},
		dataType: "text"
	});
}
</script>
<div id="dialog" title="系统提示" style="display:none"><p id="msg" style="text-align:center"></p></div>
</body>
</html>
